import { api } from "../Utils/config";
import { Account } from "../interface";

//集中管理接口
/**
 * 获取首页数据
 * @returns
 */

export const getHomeData = () => {
  return api.get("prod/index");
};
//商品详情
export const getShangData=(tid: number)=>{
  return api.get(`/prod/det?tid=${tid}`)
}
/**
 * 登录
 * @param data
 * @returns
 */
export const Login = (data: Account) => {
  return api.post<Account>("user/login", data);
};


//获取分类页数据
export const getCateData = () => {
  return api.get("prod/cate")
};


